package com.rou.im.framework.core.transfer;


import lombok.Data;

/**
 * <p></p>
 *
 * @author GaoShuangWen
 * @since 2020-04-12 13:27
 */
public interface MsgBody {


    Object getMes();

    int getLength();
  /*  @Override
    public byte[] serialize(Object object) {
        return this.mes.toByteArray();
    }

    @Override
    public Message deserialize(byte[] bytes, Class<? extends Message> clazz) {
        try {
            Message message = mes.getParserForType().parseFrom(bytes);
            if(message.getClass() != clazz){
                throw new RuntimeException("dsadsad");
            }
            return message;
        } catch (InvalidProtocolBufferException e) {
            //todo
        }
        return null;
    }*/


}
